package model;

import java.io.Serializable;

public abstract class CodeLine implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1147168283229688965L;

	private String name;

	private String label;

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public abstract int getParameterCount();

	public java.util.Collection<CommandParameter> commandParameter = new java.util.TreeSet<CommandParameter>();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public java.util.Collection<CommandParameter> getCommandParameter() {
		return commandParameter;
	}

	public void setCommandParameter(
			java.util.Collection<CommandParameter> commandParameter) {
		this.commandParameter = commandParameter;
	}

	public CommandParameter getCommandParameterForIndex(int index) {
		int i = 0;
		for (CommandParameter param : commandParameter) {
			if (i++ == index) {
				return param;
			}
		}
		return null;
	}
}
